package com.lagou.rpc.consumer;

import com.lagou.rpc.api.IUserService;
import com.lagou.rpc.consumer.anno.RpcClientScan;
import com.lagou.rpc.consumer.utils.SpringContextUtil;
import com.lagou.rpc.pojo.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@RpcClientScan(basePackages = {"com.lagou.rpc.api"})
public class ClientApplication {
    public static void main(String[] args) {
        SpringApplication.run(ClientApplication.class, args);
       /* IUserService bean = SpringContextUtil.getBean(IUserService.class);
        User user = bean.getById(1);
        System.out.println(user);*/
        //System.out.println(bean);
    }


   /* public static  void testClient(){
        IUserService userService = (IUserService) RpcClientProxy.createProxy(IUserService.class);
        User user = userService.getById(1);
        System.out.println(user);
    }*/
}
